﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AISFMIOperator
{
    public partial class MedicalServiceForm : Form
    {
        public MedicalServiceForm()
        {
            InitializeComponent();
            RefreshMedicalServices();
        }

        private void RefreshMedicalServices()
        {
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = MedicalService.GetAllMedicalServices();
            dataGridView1.Columns[0].DataPropertyName = "MedicalServiceID";
            dataGridView1.Columns[1].DataPropertyName = "MedicalServiceName";
            dataGridView1.Columns[2].DataPropertyName = "Cost";
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {

        }

        private void MedicalServiceForm_Load(object sender, EventArgs e)
        {

        }

        private void button6_Click(object sender, EventArgs e)
        {
            AddMedicalServiceForm ams = new AddMedicalServiceForm();
            ams.ShowDialog();
            RefreshMedicalServices();
        }
    }
}
